<template>
  <div class="app-container home">
    <el-row :gutter="20">
      <el-col :sm="24" :lg="24">
        <blockquote class="text-warning" style="font-size: 14px">
         欢迎您，{{$store.state.user.name}}！
        </blockquote>

        <hr />
      </el-col>
    </el-row>
    <el-row :gutter="20" style="margin-left: 10px">
      <h2 style="margin-left: -5px">公告</h2>
      <p>欢迎使用宠物领养平台！</p>
    </el-row>
    <el-row :gutter="20" style="margin-left: -2px">
      <el-col :span="1.5">
        <el-button
          type="text"
          plain
          size="mini"
          @click="showAdopt"
        >查看领养教程</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="text"
          plain
          size="mini"
          @click="showForAdopt"
        >查看送养教程</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="text"
          plain
          size="mini"
          @click="toRecord"
        >查看领养记录</el-button>
      </el-col>
    </el-row>
    <el-row style="margin:10px" v-show="showStep1">
      <el-steps :active="active1" style="width: 1000px;margin-top:10px">
        <el-step title="筛选想要领养的宠物" description="点击“我要领养”菜单，筛选想要领养的宠物"></el-step>
        <el-step title="申请领养" description="筛选出想要领养的宠物后，点击”领养“按钮，填写领养申请"></el-step>
        <el-step title="等待送养人审核" description="点击“个人中心”菜单，查看申请状态，耐心等待送养人审核"></el-step>
        <el-step title="双方联系" description="申请通过后，双方自行联系，讨论如何接走宠物、领养人应多久填写一次宠物近况信息等具体事宜"></el-step>
        <el-step title="填写宠物近况" description="成功领养后，点击页面的”添加宠物近况“按钮，填写宠物近况"></el-step>
      </el-steps>
      <el-button style="margin-top: 12px;" @click="next1">下一步</el-button>
    </el-row>
    <el-row style="margin: 10px" v-show="showStep2">
      <el-steps :active="active2" style="width: 1000px;margin-top:10px">
        <el-step title="添加送养宠物信息" description="点击”我要送养“菜单，添加送养宠物信息"></el-step>
        <el-step title="等待他人申请领养" description="点击”个人中心“菜单，查看他人申请信息"></el-step>
        <el-step title="审核他人领养申请" description="点击“个人中心”菜单，审核他人申请信息"></el-step>
        <el-step title="双方联系" description="审核同意后，双方自行联系，讨论如何接走宠物、领养人应多久填写一次宠物近况信息等具体事宜"></el-step>
        <el-step title="查看宠物近况" description="点击“个人中心”菜单，点击”宠物近况“按钮，查看领养人上传的宠物近况信息"></el-step>
      </el-steps>
      <el-button style="margin-top: 12px;" @click="next2">下一步</el-button>
    </el-row>
    <el-divider />
    <el-row :gutter="20">
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>联系信息</span>
          </div>
          <div class="body">
            <p>
              <i class="el-icon-s-promotion"></i> 论坛：暂无
            </p>
            <p>
              <i class="el-icon-user-solid"></i> QQ群：暂无
            </p>
            <p>
              <i class="el-icon-chat-dot-round"></i> 微信群：暂无
            </p>
            <p>
              <i class="el-icon-setting"></i> 管理员QQ：1768724728
            </p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "Index",
  data() {
    return {
      showStep1:false,
      showStep2:false,
      active1:0,
      active2:0,
      // 版本号
      version: "3.8.1",
    };
  },
  methods: {
    next1() {
      if (this.active1++ > 4) this.active1 = 0;
    },
    next2() {
      if (this.active2++ > 4) this.active2 = 0;
    },
    goTarget(href) {
      window.open(href, "_blank");
    },
    toRecord(){
      this.$router.push({
        path:'/record'
      });
    },
    showAdopt(){
      this.showStep2=false;
      this.showStep1=!this.showStep1;
    },
    showForAdopt(){
      this.showStep1=false;
      this.showStep2=!this.showStep2;
    }
  },
};
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>

